const mongoose = require('mongoose')

// 字段验证
let schema = {
    student_id: String,
    name: String,
    gender: String,
    age: Number,
    grade: String,
    major: String,
    email: String,
    phone: String,
    address: String,
    gpa: Number,
    courses: Array
}

// 创建数据结构对象
let studentSchema = new mongoose.Schema(schema)

// 创建操作对象
const Model = mongoose.model('students', studentSchema)


module.exports = Model

